import { EnemyManager } from "../Base/EnemyManager";
import Singleton from "../Base/Singleton";
import { ITile } from "../Levels";
import { BurstManager } from "../Scripts/Burst/BurstManager";
import { DoorManager } from "../Scripts/Door/DoorManager";
import { PlayerManager } from "../Scripts/Player/PlayerManager";
import { SpikesManager } from "../Scripts/Spikes/SpikesManager";
import { TileManager } from "../Scripts/Tile/TileManager";


export default class DataManager extends Singleton {

    static get Instance() {
        return super.GetInstance<DataManager>();
    }


    mapInfo: Array<Array<ITile>>
    tileInfo: Array<Array<TileManager>>
    mapRowCount: number = 0;
    mapColumnCount: number = 0;
    levelIndex: number = 1;
    player: PlayerManager
    door: DoorManager
    enemies: EnemyManager[] = [];
    bursts: BurstManager[] = [];
    spikes: SpikesManager[] = [];


    reset() {
        this.mapInfo = [];
        this.tileInfo = [];
        this.enemies = [];
        this.bursts = [];
        this.spikes = [];
        this.player = null;
        this.door = null;
        this.mapRowCount = 0;
        this.mapColumnCount = 0;
    }
}
